package com.lktx.sso.admin.controller;

import cn.hserver.core.ioc.annotation.Autowired;
import cn.hserver.plugin.web.annotation.Controller;
import cn.hserver.plugin.web.annotation.GET;
import cn.hserver.plugin.web.interfaces.HttpRequest;
import com.lktx.sso.admin.entity.SsoApp;
import com.lktx.sso.admin.service.SsoAppService;
import com.lktx.sso.system.common.MyResult;

import java.util.List;

@Controller("/center/")
public class SsoCenterController {

    @Autowired
    private SsoAppService service;


    @GET("appList")
    public MyResult appList(HttpRequest request) {
        List<SsoApp> list = service.list(new SsoApp());
        if (list != null) {
            return MyResult.of(list);
        }
        return MyResult.failure();
    }
}
